package com.example.smartcommunity.com.example.fragment;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.example.smartcommunity.R;
import com.example.smartcommunity.HongheiActivity;
import com.example.smartcommunity.ShangqActivity;
import com.example.smartcommunity.ThestudioActivity;

public class FindFragment extends Fragment {

    private TextView find01;
    private TextView find02;
    private TextView find03;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.activity_find,container,false);

        find01 = view.findViewById(R.id.find01);
        find02 = view.findViewById(R.id.find02);
        find03 = view.findViewById(R.id.find03);
        find01.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(getContext(), ShangqActivity.class);
                startActivity(intent);
            }
        });
        find02.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(getContext(), ThestudioActivity.class);
                startActivity(intent);
            }
        });
        find03.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(getContext(), HongheiActivity.class);
                startActivity(intent);
            }
        });

        return view;
    }
}